<?php
session_start();

// look for language in post, otherwise set it to "de"
if (isset($_POST["language"])) {
    switch($_POST["language"]) {
        case "de" :
            $_SESSION["language"] = "de";
            break;
        case "en" :
            $_SESSION["language"] = "en";
            break;
        default :
            $_SESSION["language"] = "de";
    }
} else {
    if (!$_SESSION["language"]) {
        $_SESSION["language"] = "de";
    }
}

// require the language file
require ("./language/" . $_SESSION["language"] . ".php");

// Set the title addon for every different site
$site_uri = $_SERVER['REQUEST_URI'];

// Erase base_url from site_uri
$site_uri = preg_replace("/\//", "", $site_uri);

// Clean result from dots and file endings, additionally make the first character upper case
$meta_title = ucfirst(preg_replace("/\.php/", "", $site_uri));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title>Wiesengreissler - die Wiener Art des Genusses | <?php echo $meta_title ?></title>

<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="robots" content="index, follow" />

<link rel="icon" href="favicon.ico" type="image/x-icon" />

<link rel="stylesheet" href="css/superfish.css" type="text/css"  media="screen" />
<link rel="stylesheet" href="css/main.css" type="text/css" />
<link rel="stylesheet" href="css/nivo-slider.css" type="text/css" />
<link rel="stylesheet" href="css/hoverscroll-0.2.2.css" type="text/css" />
<!--[if IE]>
<link rel="stylesheet" href="css/ie.css" type="text/css" />
<![endif]-->

<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/Myriad_Pro_400.font.js"></script>
<script type="text/javascript" src="js/Cantarell_500.font.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/superfish.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/jquery.hoverscroll-0.2.2.js"></script>
<script type="text/javascript" src="js/jquery.curvycorners.packed.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>

<?php
// Add the prettyPhoto Framework when on the fotos page
if ($site_uri == "fotos.php") {
    echo "<link rel='stylesheet' href='css/prettyPhoto.css' type='text/css'  media='screen' />";
    echo "<script type='text/javascript' src='js/jquery.prettyPhoto.js'></script>";
}
?>
<!--[if IE]>
<script src="js/DD_belatedPNG.js">
</script>
<script type="text/javascript">
DD_belatedPNG.fix('.sf-menu ul, .bottom_main, .bottom_sub, #twitter_img, #search, #hid_img, #logo img, .nivo-controlNav a');

</script>
<![endif]-->
